<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <style>
        body { font-family: "SimSun"; }
        h1 { color: blue; }
        table { width: 100%; border-collapse: collapse; }
        td, th { border: 1px solid black; padding: 8px; }
    </style>
</head>
<body>
<h1 th:text="${title}">标题</h1>
<p th:text="${content}">考试结果</p>
<table>
    <tr>
        <th>考试名称</th>
        <th>考试时间</th>
        <th>得分</th>
        <th>是否通过</th>
    </tr>
    <tr th:each="paper : ${papers}">
        <td th:text="${paper.examName}">考试名称</td>
        <td th:text="${paper.examTime}">考试时间</td>
        <td th:text="${paper.score}">得分</td>
        <td th:text="${paper.pass}">是否通过</td>
    </tr>
</table>
<h2>以下为考卷详情</h2>
<p th:each="exam : ${exams}">
    <span th:text="${exam.pageTitle}">考试标题</span>
    得分：<span th:text="${exam.score}">考试标题</span>
    <span th:text="${exam.pass}">考试标题</span>
    <br/>
    <i>绿色背景为正确答案</i>
    <span th:each="question : ${exam.paperQu}">
        <br/>
       <span>【<span th:switch="${question.quType}">
           <span th:case="1">单选题</span>
           <span th:case="2">多选题</span>
           <span th:case="3">判断题</span>
       </span>】
       </span>
        <span th:text="${question.sort + 1}">序号</span>.<span th:text="${question.quInfo.content}">题目内容</span>
        <span th:each="quAnswer : ${question.quAnswerList}">
            <br/>
            <span th:text="${quAnswer.content}"
                  th:style="${quAnswer.isRight} ? 'background-color: lightgreen;'">答案内容</span>
        </span>
        <br/>
        <br/>
        <span>是否作答：<span th:text="${question.answered} ? '已作答' : '未作答'"></span></span>
        <br/>
        <span>回答情况：<span th:text="${question.isRight} ? '正确' : '错误'"></span></span>
        <br/>
    </span>
</p>
</body>
</html>
